<template>
	<view class="cu-item shadow item">
		<view class="cu-list menu-avatar">
			<view class="cu-item">
				<view class="image">
					<image :src="formatImg(cardInfo.head_thumb)"></image>
				</view>
				<view class="flex-sub">
					<view class="project-title">姓名：{{ cardInfo.username ? cardInfo.username : "未认证会员"  }}</view>
					<view class="company">手机号：{{ cardInfo.mobile }}</view>
					<view class="company">注册时间：{{ cardInfo.create_time }}</view>
				</view>
				<view class="status" :class="cardInfo.is_check === 1? 'text-orange' : 'text-red'">
					{{formatStatus(cardInfo.is_check)}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "index",
		props: {
			cardInfo: {
				type: Object
			}
		},
		data() {
			let that = this;
			return {
				imgUrl: that.$mConfig.assetsPath,
			};
		},
		methods: {
			formatStatus(status) {
				console.log(status)
				switch (status) {
					case 1:
						return "已认证";
					case 0:
						return "未认证";
				}
			},
			formatImg(thumb) {
				return this.imgUrl + thumb;
			}
		}
	};
</script>

<style lang="scss" scoped>
	.item{
		background:rgba(255,255,255,1);
		box-shadow:0px 4rpx 36rpx 0px rgba(206,206,206,0.48);
		border-radius:20rpx;
		margin: 0 30rpx;
		overflow: hidden;

	}
	.project-title {
		font-size:30rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(50,50,50,1);
		margin-bottom: 28rpx;
	}

	.company {
		font-size:24rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(50,50,50,1);
	}

	.status {
		font-size:30rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(255,106,0,1);
	}

	.image image {
		width:112rpx !important;
		height:112rpx;
		border-radius:50%;
		margin: 0 !important;
		background:linear-gradient(-90deg,rgba(234,238,247,1),rgba(146,162,187,1));
	}
	.image{
		margin: 0 30rpx 0 0 !important;
	}
</style>
